package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * Created by Choisaaaa on 2018/6/7.
 * 注意：
 * 1.在Thymeleaf模板文件中，在3.0版本之前是需要闭合的
 *
 */

@Controller
@RequestMapping("/templates")
public class TemplatesController {

    @RequestMapping("/hello")
    public String hello(Map<String,Object> map){
        map.put("name","mark");
        return "hello";
    }

    @RequestMapping("/helloFtl")
    public String helloFtl(Map<String,Object> map){
        map.put("name","mark");
        return "helloFtl";
    }
}
